Skip to content

Fix config save failure when Impl assembly is loaded from memory#32

Merged
AgentSmithers merged 1 commit into
AgentSmithers:masterfrom
steveviuv:fix-config-save-failure
May 24, 2026
Merged

Fix config save failure when Impl assembly is loaded from memory#32
AgentSmithers merged 1 commit into
AgentSmithers:masterfrom
steveviuv:fix-config-save-failure

Conversation

@steveviuv

Copy link
Copy Markdown

McpServerConfig previously relied on Assembly.Location to build the
config file path. In debug/unloadable mode, the Impl assembly may be
loaded from memory, which can leave Assembly.Location empty and cause
"The path is not of a legal form." when saving config.

Fall back to AppDomain.CurrentDomain.BaseDirectory and then
Environment.CurrentDirectory when the assembly path is unavailable.

McpServerConfig.ConfigPath previously relied on Assembly.Location
In debug / unloadable mode, the Impl assembly may be loaded from memory
This can make Assembly.Location empty and cause The path is not of a legal form.
Fix by falling back to AppDomain.CurrentDomain.BaseDirectory and then Environment.CurrentDirectory
@AgentSmithers
AgentSmithers merged commit 3f1f872 into AgentSmithers:master May 24, 2026
@AgentSmithers

Copy link
Copy Markdown
Owner

Merged. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants